function toUnder(name) {
    return name.replace(/[A-Z]/g, ($0, $1) => "_" + $0.toLowerCase()).replace(/^_/, "").toLowerCase()
}
function toCamel(name) {
    return name.replace(/_([a-z])/g, ($0, $1) => $1.toUpperCase()).replace(/^[A-Z]/, $0 => $0.toLowerCase())
}
function toPasic(name) {
    return toCamel(name).replace(/^[a-z]/, $0 => $0.toUpperCase())
}
module.exports = {
    toUnder,
    toCamel,
    toPasic,
    getProperty(context, handler, dft = undefined) {
        try {
            return handler(context)
        } catch (error) {
            return dft
        }
    }
}